package com.qtong.entity.screenings;

import org.springframework.data.mongodb.core.mapping.Document;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Document(collection = "screenings")
public class Screening {
    private String id;
    private String screeningId;
    private String movieId;
    private String cinemaId;
    private String hallId;
    private Date showTime;
    private Double ticketPrice;
    private List<Seat> lockedSeats = new ArrayList<>();
    private List<Seat> soldSeats = new ArrayList<>();
    private SeatLayout seatLayout;

    public static class Seat {
        private int row;
        private int col;
        public Seat() {}
        public Seat(int row, int col) { this.row = row; this.col = col; }
        public int getRow() { return row; }
        public void setRow(int row) { this.row = row; }
        public int getCol() { return col; }
        public void setCol(int col) { this.col = col; }
    }

    public static class SeatLayout {
        private Integer rows;
        private Integer cols;
        public SeatLayout() {}
        public Integer getRows() { return rows; }
        public void setRows(Integer rows) { this.rows = rows; }
        public Integer getCols() { return cols; }
        public void setCols(Integer cols) { this.cols = cols; }
    }

    public Screening() {}
    public String getId() { return id; }
    public void setId(String id) { this.id = id; }
    public String getScreeningId() { return screeningId; }
    public void setScreeningId(String screeningId) { this.screeningId = screeningId; }
    public String getMovieId() { return movieId; }
    public void setMovieId(String movieId) { this.movieId = movieId; }
    public String getCinemaId() { return cinemaId; }
    public void setCinemaId(String cinemaId) { this.cinemaId = cinemaId; }
    public String getHallId() { return hallId; }
    public void setHallId(String hallId) { this.hallId = hallId; }
    public Date getShowTime() { return showTime; }
    public void setShowTime(Date showTime) { this.showTime = showTime; }
    public Double getTicketPrice() { return ticketPrice; }
    public void setTicketPrice(Double ticketPrice) { this.ticketPrice = ticketPrice; }
    public List<Seat> getLockedSeats() { return lockedSeats; }
    public void setLockedSeats(List<Seat> lockedSeats) { this.lockedSeats = lockedSeats; }
    public List<Seat> getSoldSeats() { return soldSeats; }
    public void setSoldSeats(List<Seat> soldSeats) { this.soldSeats = soldSeats; }
    public SeatLayout getSeatLayout() { return seatLayout; }
    public void setSeatLayout(SeatLayout seatLayout) { this.seatLayout = seatLayout; }
}
